FROM alpine:3.17
ADD new_ip.sh /root/
RUN chmod +x /root/new_ip.sh
RUN apk add curl
RUN apk add mini-sendmail
RUN touch /root/log
RUN echo "*/5 * * * * /root/new_ip.sh > /root/log 2>&1" >> /var/spool/cron/crontabs/root
ENV EMAIL 'abc@mynetgear.com'
ENV USERNAME 'mynetgear'
ENV PASSWORD 'mynetgear'
ENV SMTP_HOST 'mynetgear'
CMD crond && tail -f /root/log
